package com.business.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.business.system.vo.AuditBusinessVo;
import com.business.system.vo.GoodsShopVo;
import com.common.entity.Goods;
import com.common.entity.GoodsShop;
import com.common.entity.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author pgx
 * @since 2022-08-31
 */
@Mapper
public interface ShopMapper extends BaseMapper<Shop> {

    List<Map> detailedMsg(Integer id);

    Integer editStart(Integer id);

    Integer editStart02(Integer id);

    Integer addShop(AuditBusinessVo auditBusinessVo);

    Integer updateAudtstate(String sname);

    Integer updateAudit(String sname);

    Map findByIdShopMsg(Integer id);

    IPage<Map> shopAndGoods(Page<Goods> page,@Param("ew") QueryWrapper<Goods> queryWrapper);

    Map findByZidAll(Integer id);

    List<Map> selectShopMsg(Integer bid);

    Integer updateBusinessCid(@Param("bid") Integer bid,@Param("tid") Integer tid);

    Integer updateShopMsg(@Param("username") String username,@Param("start") Integer start,@Param("address") String address);

    Shop findShopId(Integer bid);

    IPage<Map> selectShopGoodsMsg(Page<Goods> page,@Param("ew") QueryWrapper<Goods> queryWrapper);

    Integer updateGoodsState(Integer id);

    Integer updateGoodsState02(Integer id);

    GoodsShop findGoodsByShop(@Param("gid") String gid,@Param("sid") Integer sid);


    Integer addGoodsToShop(GoodsShopVo goodsShopVo);

    Integer updateGoodsShop(GoodsShopVo goodsShopVo);
}
